<%@ page import="java.util.List" %>
<%@ page import="com.luzhikun.jsptest.myjsp.Students" %>
<%@ page import="java.util.Iterator" %>
<%--
  Created by IntelliJ IDEA.
  User: 小柒的Java
  Date: 2021/4/27
  Time: 15:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    List<Students> student = (List<Students>) request.getAttribute("student");
    Iterator<Students> iterator = student.iterator();

%>

<table border="1px" cellpadding="0px">
    <tr>
        <td>学号</td>
        <td>姓名</td>
        <td>年龄</td>
        <td>性别</td>
    </tr>
    <%
        while (iterator.hasNext()) {
            Students next = iterator.next();
    %>
    <tr>

        <td>
            <%=next.getId()%>
        </td>
        <td>
            <%=next.getName()%>
        </td>
        <td>
            <%=next.getAge()%>
        </td>
        <td>
            <%=next.getSex()%>
        </td>
    </tr>

    <%
        }
    %>

</table>


</body>
</html>
